﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="KhaiBaoKhoaHuanLuyen.ascx.cs" Inherits="WebUserControl_KhaiBaoKhoaHuanLuyen" %>
<%@ Register src="uscMsgBox.ascx" tagname="uscMsgBox" tagprefix="uc2" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1" %>

<link rel="stylesheet" href='<%=ResolveUrl("~/LayoutCss/K_BaoCaoFormLayout.css")%>' type="text/css" />


<script type="text/javascript">
     function pageLoad() 
     {
     $("#<%= btnNew.ClientID %>").click(function() { 
        $.blockUI({
             message: '<h1>Xin vui lòng chờ xử lý</h1>', 
            css: { 
            border: 'none', 
            padding: '15px', 
            backgroundColor: '#f00', 
            opacity: .5, 
            color: '#fff' 
        } }); 
        }); 
        
     $("#<%= btnSave.ClientID %>").click(function() { 
        if ($("#<%= txtCourseID.ClientID %>").val().length>0 && $("#<%= txtDesc.ClientID %>").val().length>0)
         {
        $.blockUI({
             message: '<h1>Xin vui lòng chờ xử lý</h1>', 
            css: { 
            border: 'none', 
            padding: '15px', 
            backgroundColor: '#f00', 
            opacity: .5, 
            color: '#fff' 
        } });
        } 
        }); 
        
        
     
        Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
                function EndRequestHandler(sender, args) {
                        $.unblockUI();
                }
        }  
   
</script> 
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>    
    <fieldset>
        <legend>Khai báo khóa huấn luyện</legend>
   
                <asp:Panel ID="Panel1" runat="server" Width="100%" BackColor="#EBEBEB">
                    <asp:ImageButton ID="btnNew" runat="server"  CausesValidation="false"
                        ImageUrl="~/WebMaster/Images/Document.png" onclick="btnNew_Click" 
                        ToolTip="Thêm mới" Width="25px" Height="25px" />
                    &nbsp;<asp:ImageButton ID="btnSave" runat="server" 
                        ImageUrl="~/WebMaster/Images/Save.png" onclick="btnSave_Click" 
                        ToolTip="Lưu" Width="25px" Height="25px" />
                    </asp:Panel>
     <br />
      <div class="fm-req">
              <label for="TxtMaNganhHang">Mã khóa huấn luyện</label> 
                        <asp:TextBox ID="txtCourseID" BackColor="Yellow" ReadOnly="true" runat="server" Width="200px"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                                ErrorMessage="Mã không được để trống" ControlToValidate="txtCourseID" Display="None"></asp:RequiredFieldValidator>
                            <cc1:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" 
                                TargetControlID="RequiredFieldValidator1" Enabled="True">
                            </cc1:ValidatorCalloutExtender>
      </div>
       <div class="fm-req">
              <label for="TxtMaNganhHang">Mô tả</label> 
                        <asp:TextBox ID="txtDesc" runat="server" Width="200px"></asp:TextBox>
              <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                                ErrorMessage="Mô tả không được để trống" ControlToValidate="txtDesc" Display="None"></asp:RequiredFieldValidator>
                            <cc1:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" 
                                TargetControlID="RequiredFieldValidator2" Enabled="True">
                            </cc1:ValidatorCalloutExtender>
      </div>
      <div class="fm-re">
              <label for="TxtMaNganhHang">Nội dung</label> 
              <asp:TextBox ID="txtMoreDesc" runat="server" Width="451px" Height="62px" TextMode="MultiLine"></asp:TextBox>
   </fieldset> 
             <br />
                       
                        <asp:GridView ID="gvListHRTrainCourse" runat="server" AllowPaging="True" 
                            AutoGenerateColumns="False"  PageSize="8"
                            onrowcommand="gvListHRTrainCourse_RowCommand" Width="100%" 
                            onpageindexchanging="gvListHRTrainCourse_PageIndexChanging">
                            <Columns>
                                <asp:BoundField DataField="CourseID" HeaderText="Mã khóa huấn luyện">
                                    <ItemStyle Width="200px" />
                                </asp:BoundField>
                                <asp:BoundField DataField="CourseDesc" HeaderText="Mô tả" />
                                <asp:BoundField DataField="CourseMoreDesc" HeaderText="Nội dung" />
                                <asp:TemplateField HeaderText="Chọn">
                                    <ItemTemplate>
                                        <asp:Button ID="btnSelected" CausesValidation="false" runat="server" CommandName="SelectedTrainCourse" 
                                            Text="Chọn" ToolTip="Chọn để xem chi tiết và cập nhật" />
                                    </ItemTemplate>
                                    <ItemStyle HorizontalAlign="Center" Width="60px" />
                                </asp:TemplateField>
                            </Columns>
                        </asp:GridView>
                        
</ContentTemplate>
</asp:UpdatePanel>
    <uc2:uscMsgBox ID="uscMsgBox1" runat="server" />
